package cn.xinfei.xdecision.common.model.analyse.model;

/**
 *
 */
public enum WindowEnum {
    ACCURATE(1L),
    SECOND(1000L),
    MINUTE(60*1000L),
    HOUR(3600*1000L),
    DAY(24*3600*1000L),
    WEEK(7*24*3600*1000L),
    MONTH(30*24*3600*1000L),
    QUARTER(120*24*3600*1000L),
    YEAR(360*24*3600*1000L);

    private Long cellTime;

    WindowEnum(Long cellTime) {
        this.cellTime = cellTime;
    }

    public static Long getCellTime(String window){
        Long cellTime = WindowEnum.valueOf(window).cellTime;
        return cellTime;
    }
}
